package com.dmagic.cms.entity;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.hibernate.annotations.Where;

import com.dmagic.cms.common.Constants;
import com.dmagic.cms.common.entity.ModifyInfoEntity;

/**
 * The persistent class for the UploadFileSetInfo database table.
 */
@Entity
@Table(name = "dmagic_upload_fileset_info")
@Where(clause = ModifyInfoEntity.ISOBSOLETE_DATE_IS_NULL)
public class UploadFileSetInfo extends ModifyInfoEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	private Long uploadFileSetInfoId;

	private String fileSetStatus;

	private List<UploadFileInfo> uploadFileInfos;

	public UploadFileSetInfo() {
		super();
	}

	@Id
	@GeneratedValue(strategy = GenerationType.TABLE, generator = Constants.ID_GENERATOR)
	@TableGenerator(name = Constants.ID_GENERATOR, // Generator Name which same
													// with
	// generator
	table = Constants.ID_GENERATOR, // Generator Table Name
	pkColumnName = Constants.PK_COLUMNNAME, // Generator Table column Id name
	valueColumnName = Constants.VALUE_COLUMN_NAME, // Generator Table column Id
													// value
	pkColumnValue = "UploadFileSetInfo", // entity Name
	allocationSize = (Constants.ID_GENERATOR_ALLLCATIONSIZE), initialValue = Constants.ID_GENERATOR_INITIALVALUE)
	public Long getUploadFileSetInfoId() {
		return this.uploadFileSetInfoId;
	}

	public void setUploadFileSetInfoId(Long uploadFileSetInfoId) {
		this.uploadFileSetInfoId = uploadFileSetInfoId;
	}

	// bi-directional many-to-one association to UploadFileInfo
	@OneToMany(mappedBy = "uploadFileSetInfoId")
	@Where(clause = ModifyInfoEntity.ISOBSOLETE_DATE_IS_NULL)
	public List<UploadFileInfo> getUploadFileInfos() {
		return this.uploadFileInfos;
	}

	public void setUploadFileInfos(List<UploadFileInfo> uploadFileInfos) {
		this.uploadFileInfos = uploadFileInfos;
	}

	public String getFileSetStatus() {
		return fileSetStatus;
	}

	public void setFileSetStatus(String fileSetStatus) {
		this.fileSetStatus = fileSetStatus;
	}
}